package com.sz.sboot.controller;

import com.sz.sboot.entity.TRoles;
import com.sz.sboot.service.IRolesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import java.util.List;

//@ApiIgnore //表示该方法或类可以被忽略
@RestController
@RequestMapping("/role")
public class TRolesController {

    @Autowired
    private IRolesService iRolesService;

    @GetMapping("/rlist")
    public List<TRoles> rlist(){
        return iRolesService.getAllRoles();
    }
}
